<table class="orderlist" width="100%" border="1" cellpadding="0" cellspacing="0">
  <caption class="title">
  所有人订餐历史记录
  </caption>
  <thead>
    <tr>
      <th style="display:none">OrderId</th>
      <th width="21%" scope="col">订餐人</th>
      <th width="10%" scope="col">餐馆</th>
      <th width="30%" scope="col">菜名</th>
      <th style="display:none">单价</th>
      <th style="display:none">数量</th>
      <th width="10%" scope="col">总价</th>
      <th width="21%" scope="col">订餐时间</th>
      <th style="display:none">是否支付</th>
      <th style="display:none">支付时间</th>
      <th width="8%" scope="col">&nbsp;</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach($orders as $oneorder): ?>
    <tr>
      <td style="display:none"><?php echo $oneorder['Order']['id'] ?></td>
      <td><?php echo $oneorder['People']['name'] ?></td>
      <td><?php echo $oneorder['Shop']['name'] ?></td>
      <td><?php echo $oneorder['Food']['name'] ?></td>
      <td style="display:none"><?php echo $oneorder['Food']['price'] ?></td>
      <td style="display:none"><?php echo $oneorder['Order']['count'] ?></td>
      <td<?php if($oneorder['Order']['paid'] == '0'){echo ' class="unpaid"';} ?>><?php echo $oneorder['Food']['price'] * $oneorder['Order']['count'] ?></td>
      <td><?php echo date('Y-m-d', strtotime($oneorder['Order']['created'])) ?></td>
      <td style="display:none"><?php echo $oneorder['Order']['paid'] == '0' ? 'N' : 'Y' ?></td>
      <td style="display:none"><?php echo date('Y-m-d', strtotime($oneorder['Order']['modified'])) ?></td>
      <td><a href="#" onclick="showDialog(this); return false;">详细</a></td>
    </tr>
    <?php endforeach ?>
  </tbody>
</table>
<?php echo $this->element('dialog') ?>
